Skip to content

Add clone parameter support to startWorkspace in web and mobile clients#12

Merged
gricha merged 1 commit intomainfrom
fix/clone-flag-support
Jan 6, 2026
Merged

Add clone parameter support to startWorkspace in web and mobile clients#12
gricha merged 1 commit intomainfrom
fix/clone-flag-support

Conversation

@gricha
Copy link
Copy Markdown
Owner

@gricha gricha commented Jan 6, 2026

Summary

  • Fixed missing --clone parameter support in web and mobile API clients for startWorkspace
  • Updated type definitions to include clone and env optional parameters
  • Aligned web/mobile client behavior with CLI where perry start --clone <url> works correctly

Background

After the consolidation of perry create into perry start (#7), the CLI correctly supports perry start myworkspace --clone <url>. However, the web and mobile API clients had outdated type definitions that didn't include the clone parameter, preventing UIs from creating workspaces with repositories.

Changes

web/src/lib/api.ts:

  • Updated start RPC type to include clone?: string and env?: Record<string, string>
  • Updated startWorkspace function signature to accept and forward these options

mobile/src/lib/api.ts:

  • Same changes as web client for consistency

Test plan

  • Verify CLI still works: perry start mytest --clone https://github.com/user/repo
  • Test web UI can create workspaces with repositories
  • Test mobile app can create workspaces with repositories
  • Verify existing workspaces can still be started without the clone parameter

🤖 Generated with Claude Code

Previously, the `--clone` flag was only supported in the CLI's `perry start` command
and worked correctly on the backend. However, the web and mobile API clients had
type definitions and function signatures for `startWorkspace` that didn't include
the `clone` parameter, preventing UI clients from passing repository URLs when
starting workspaces.

This change updates both web and mobile API clients to:
- Add `clone` and `env` optional parameters to the `start` RPC type definition
- Update the `startWorkspace` function to accept and pass through these options

This aligns the web/mobile clients with the CLI behavior where `perry start --clone <url>`
creates a workspace with a repository if it doesn't exist.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@gricha gricha merged commit 193b07d into main Jan 6, 2026
4 checks passed
@gricha gricha deleted the fix/clone-flag-support branch January 7, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant